<html xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- 论坛的页对 -->
<div class="header" th:fragment="bbs_header">
    <div class="main">
        <a class="logo" href="/" title="Fly">Fly社区</a>
        <div class="nav">
            <a class="nav-this" href="jie/index.html">
                <i class="iconfont icon-wenda"></i>问答
            </a>
            <a href="http://www.layui.com/" target="_blank">
                <i class="iconfont icon-ui"></i>框架
            </a>
        </div>

        <div class="nav-user">
            <!-- 未登入状态 -->
            <a th:href="${session.USER_SESSION_KEY eq null} ? '/login' : '/'"
                th:class="${session.USER_SESSION_KEY eq null} ? 'unlogin' : 'avatar'">
                <!-- 显示未登陆用户图标注 -->
                <i class="iconfont icon-touxiang" th:if="${session.USER_SESSION_KEY eq null}"></i>

                <!-- 用户登陆后的头像及姓名 -->
                <img th:src="${session.USER_SESSION_KEY ne null} ? ${session.USER_SESSION_KEY.getPhoto()}">
                <cite th:text="${session.USER_SESSION_KEY ne null} ? ${session.USER_SESSION_KEY.getName()}"></cite>

            </a>
            <!-- 未登陆显示这里，登陆和注册 -->
            <span th:if="${session.USER_SESSION_KEY eq null}">
                <a href="/login">登入</a><a href="/register">注册</a>
            </span>

            <!-- 登陆了显示这里，头像和设置 -->
            <div th:if="${session.USER_SESSION_KEY ne null}" class="nav">
                <a href="/settings"><i class="iconfont icon-shezhi"></i>设置</a>
                <a href="/logout"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
            </div>

            <!--
            <p class="out-login">
                <a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq" title="QQ登入"></a>
                <a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo" title="微博登入"></a>
            </p>
            -->

        </div>
    </div>
</div>

<!-- 论坛页脚 -->
<div class="footer" th:fragment="bbs_footer">
    <p><a href="http://fly.layui.com/">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/">layui.com</a></p>
    <p>
        <a href="http://fly.layui.com/auth/get" target="_blank">产品授权</a>
        <a href="http://fly.layui.com/jie/8157.html" target="_blank">获取Fly社区模版</a>
        <a href="http://fly.layui.com/jie/2461.html" target="_blank">微信公众号</a>
    </p>
</div>